﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CatalogManager.ascx.cs" Inherits="NCS.Module.LinkSite.Admin.CatalogManager" %>
<script runat="server">

    protected void gvTieude_RowDeleted(object sender, GridViewDeletedEventArgs e)
    {

    }

    protected void gvTieude_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {

    }
</script>

<table cellpadding="0" cellspacing="0" width="100%">
<tr>
		<td height="30">
		</td>
	</tr>
	<tr>
	    <td><strong> Thêm Mục WebLink</strong></td>
	</tr>
	<tr>
	    <td height = 30>&nbsp;</td>
	</tr>
	<tr>
	    <td>
	        <table>
	            <tr>
	                <td align ="left">ID:</td>
	                <td align = "left"><asp:TextBox runat = "server" ID = "txtIDTitle" Enabled = "false" Width="64px"></asp:TextBox></td>
	            </tr>
	            <tr>
	                <td align="left">Tên :</td>
	                <td align ="left"><asp:TextBox runat ="server" ID = "txtTieuchi" Width = "209px"></asp:TextBox> </td>
	            </tr>
	            <tr>
	                <td>&nbsp;</td>
	                <td align = "left">
	                    <asp:Button runat ="server" ID = "txtThemmoi" Text = "Thêm mới" OnClick="txtThemmoi_Click"/>&nbsp;
	                    <asp:Button runat ="server" ID ="btnCapnhat" Text ="Cập nhật" OnClick="btnCapnhat_Click" />
	                </td>
	            </tr>
	        </table>
	    </td>
	</tr>
	<tr>
	    <td height = "30"> &nbsp;</td>
	</tr>
	<tr>
	    <td width="100%">
	        <asp:GridView ID ="gvTieude" runat ="server" AutoGenerateColumns="False" AllowPaging = "true" OnPageIndexChanging="gvTieude_PageIndexChanging" OnRowDataBound="gvTieude_RowDataBound" OnRowCommand="gvTieude_RowCommand" OnRowDeleted="gvTieude_RowDeleted" OnRowDeleting="gvTieude_RowDeleting" Width="100%">
	            <Columns>
	                <asp:BoundField  DataField = "IDTitle" HeaderText ="ID"/>
	                <asp:BoundField headertext="STT">
						<headerstyle width="10%"></headerstyle>
					</asp:BoundField>
	                <asp:BoundField DataField = "TitleName" HeaderText = "Tên mục"/>
	                <asp:TemplateField  >
	                    <HeaderTemplate>Thao tác</HeaderTemplate>
	                    <ItemTemplate>
	                        <asp:Button ID ="btnEdit" runat = "server" CommandName="EditAnything" Text = "Sửa" CommandArgument = '<%# Eval("IDTitle") %>'/> &nbsp;
	                        <asp:Button ID = "btnDel" runat = "server" CommandName ="delete" Text ="Xóa" CommandArgument = '<%# Eval("IDTitle") %>' />
	                    </ItemTemplate>
	                </asp:TemplateField>	                
	            </Columns>
	        </asp:GridView>
	    </td>
	</tr>
</table>